using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class GuarCoverageMap : EntityTypeConfiguration<GuarCoverage>
    {
        public GuarCoverageMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.GUARID)
                .HasMaxLength(6);

            this.Property(t => t.File_Primary_Key)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("GuarCoverage");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.TYPEID).HasColumnName("TYPEID");
            this.Property(t => t.GUARID).HasColumnName("GUARID");
            this.Property(t => t.COVERED).HasColumnName("COVERED");
            this.Property(t => t.File_Primary_Key).HasColumnName("File Primary Key");
        }
    }
}
